package com.cjlgb.design.upms.api.entity;

import com.cjlgb.design.common.mybatis.bean.BaseEntity;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author WFT
 * @date 2019/9/1
 * description:
 */
@Getter
@Setter
@NoArgsConstructor
public class Oauth2Account extends BaseEntity {

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 锁定标记:{ -1:锁定,0:正常 }
     */
    private Integer lockFlag;

    /**
     * 用户标识：{ 1：后台用户 }
     */
    private Integer userFlag;

    public Oauth2Account(SysUserInfo info,String password){
        super(info.getAccountId());
        this.username = info.getAccountName();
        this.password = password;
        this.lockFlag = info.getLockFlag();
        this.userFlag = 1;
    }

    public Oauth2Account(String username, Integer lockFlag) {
        this.username = username;
        this.lockFlag = lockFlag;
    }
}
